package com.ithehema;

import java.util.Scanner;

public class StringDemo06 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        String str = reverse2(s);
        System.out.println(str);
    }
    public static String reverse2(String str) {
     String result="";
     for(int i=str.length()-1;i>=0;i--){
         char ch = str.charAt(i);
         result+=ch;
     }
     return result;
    }
    public static String reverse1(String str) {
        char[] charArray = str.toCharArray();
        int left = 0;
        int right = str.length() - 1;
        while (left < right) {
            char tmp = charArray[left];
            charArray[left] = charArray[right];
            charArray[right] = tmp;
            left++;
            right--;
        }
        return new String(charArray);
    }
}
